package org.toves.checklua.scan;

public class TokenType {
	public static TokenType createErrorType(String message) {
		TokenType ret = new TokenType(message);
		ret.error = true;
		return ret;
	}
	
	public static final TokenType TOKEN_ERROR = createErrorType("invalid character(s)");
	public static final TokenType TOKEN_EOF = new TokenType("EndOfInput");
	
	private boolean error;
	private String description;
	
	public TokenType(String description) {
		this.error = false;
		this.description = description;
	}
	
	public boolean isError() {
		return error;
	}
	
	public String toString() {
		return description;
	}
	
	public TokenType process(TokenScanner scanner, String text) {
		return this;
	}
	
	
}
